package org.jgs2007.onemall.controller;

import org.jgs2007.onemall.util.ResponseUtil;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * @author: luKai
 * @date： 2020/10/23 10:47
 * @description： 首页控制器
 */
@RestController
@RequestMapping("dashboard")
public class DashBordController {

    @GetMapping("")
    public Object info() {

        Map<String, Integer> data = new HashMap<>();
        data.put("userTotal", 189);
        data.put("goodsTotal", 0);
        data.put("productTotal", 208);
        data.put("orderTotal", 1);

        return ResponseUtil.ok(data);
    }
}
